<template>
    <vechart :id="id"  :option="chartoption"></vechart>
</template>

<script>
    import vechart from './vechart.vue'

    export default {
        components: {vechart},
        props: ["id", "chartData"],
        data() {
            return {
                chartoption: {
                    color:["#00ffff"],
                    radar: {
                        // shape: 'circle',
                        name: {
                            textStyle: {
                                color: '#fff',
                                borderRadius: 3,
                            }
                        },
                        indicator: [
                            { name: '语文'+'('+this.chartData.data[0]+')', max: 150},
                            { name: '数学'+'('+this.chartData.data[1]+')', max: 150},
                            { name: '英语'+'('+this.chartData.data[2]+')', max: 150},
                            { name: '综合'+'('+this.chartData.data[3]+')', max: 300},
                            { name: '总分'+'('+this.chartData.data[4]+')', max: 750},
                            { name: '排名'+'('+this.chartData.data[5]+')', max: 100000}
                        ]
                    },
                    series: [{
                        name: '预算 vs 开销（Budget vs spending）',
                        type: 'radar',
                        // areaStyle: {normal: {}},
                        data : [
                            {
                                value : this.chartData.data
                            }
                        ],
                    }]
                }
            }
        },
        mounted() {
        }
    };
</script>
